package com.gozap.sort.tree;

public class Tree {

	private Tree left;
	private Tree right;
	private Object key;
	private Tree parent;

	public Tree(Object key) {
		this.key = key;
	}

	public Tree getLeft() {
		return left;
	}

	public void setLeft(Tree left) {
		this.left = left;
	}

	public Tree getRight() {
		return right;
	}

	public void setRight(Tree right) {
		this.right = right;
	}

	public Object getKey() {
		return key;
	}

	public void setKey(Object key) {
		this.key = key;
	}

	public Tree getParent() {
		return parent;
	}

	public void setParent(Tree parent) {
		this.parent = parent;
	}

	@Override
	public String toString() {
		return key.toString();
	}
}
